Introduction to Sockeye

Tony Liang

University of British Columbia

Land acknowledgement

I would like to acknowledge that I work on the traditional, ancestral, and unceded territory of the Coast Salish Peoples, including the territories of the xwməθkwəy̓əm (Musqueam), Skwxwú7mesh (Squamish), Stó:lō and Səl̓ílwətaʔ/Selilwitulh (Tsleil- Waututh) Nations.

Traditional: Traditionally used and/or occupied by Musqueam people

Ancestral: Recognizes land that is handed down from generation to generation

Unceded: Refers to land that was not turned over to the Crown (government) by a treaty or other agreement

Setup VSCode

Checkout the instruction of your right platform below:

Open this link to download, once it is finished:

  1. Open the downloaded VSCode-darwin-universal.zip file
  2. Move the extracted VS Code app from Downloads to Applications (Located to your left under Favorites)
  3. Launch VS Code and open the Command Palette by Cmd + Shift + P
  4. Type shell command
  5. Select the option: Install code command in PATH
  6. Restart your terminal and try entering: code --version to confirm successful installation

Open this link to download.

Run the installer, accept default config except:

  • On Select Additional Tasks
    • Add ‘Open with Code action to Windows file context menu’
    • Add ‘Open with Code’ action to Windows directory context menu”
    • Register Code as an editor for supported file types
    • Add to PATH (should be selected by default)

Connecting to Sockeye

Note

You need to have a UBC IP address in order to access to the server by connecting to eduroam or ubcsecure

Login to sockeye with the ssh command:

ssh cwl@sockeye.arc.ubc.ca
  • cwl is your campus wide login

  • password is your same CWL password

  • sockeye.arc.ubc.ca is the server address

  • you also need Two-Factor Authentication 2FA

Alternative way connecting to Sockeye

  1. Generate new ssh key pair credentials in your local
  2. Add the public key to the server-side
  3. Add your server login info into ~/.ssh/config in your local
  4. Login with ssh <new_alias>

Generate a new ssh key pair

ssh-keygen -t rsa
  • Follow default by prompting Enter
  • Passphrase optional
  • Two keys generated:
    • one public (id_rsa.pub)
    • one private (id_rsa)

Caution

Keep the private key safe and for your use only

Alternative way connecting to Sockeye

Add your public key to the server

# Need to replace cwl!
ssh-copy-id -i ~/.ssh/id_rsa.pub
# Need to replace cwl!
type $env:USERPROFILE\.ssh\id_rsa.pub | ssh cwl@sockeye.arc.ubc.ca "cat >> .ssh/authorized_keys"

Use any editor to create ~/.ssh/config and enter the following:

# Note these indent matters
Host  arc # or another alias you like
  HostName sockeye.arc.ubc.ca
  User cwl # replace your cwl


  • Host = User@Hostname
  • Multiple configuration (multiple servers)
  • More options available , look at here

Sockeye

# If you followed earlier configuration correctly
ssh arc # otherwise ssh cwl@sockeye.arc.ubc.ca
  • Upon login, you land on the login node and spend most time here
  • Use it to run large computational works
  • Whenever you’re ready, you submit batch jobs to server
  • You can log out and leave a job running
  • Runs with PBS, changing to SLURM1 soon

Tip

We also have a recorded session from past months, if you’re interested please contact Amrit

Directories on Sockeye

Tip

Remember that read/write access matters! You clearly don’t want to spend hours fitting models, but failed to write any results, cause you forgot to specify it to be the scratch directory.

VScode in Sockeye

Using direct text editors like nano or vi/vim could be hard (steep learning curve)

So, use VSCode instead!


  1. Open local terminal and prompt code

  2. Press Ctrl + Shift + X

  3. Type Remote - SSH in search bar

  4. Open first option and click install

Accessing softwares

  • Once you connect with ssh:
  • There are no applications loaded
  • You must tell system what you need
  • Limited options, if need more try container or conda

Useful commands

module load bin1/x.y.z bin2/x.y.z # load two modules and their versions
module purge # unload all modules
module list # what you have loaded
module save name_col # save loaded modules to "<name_col>"
module savelist # list saved collections (<name col> this case)
module restore name_col # load saved collection
module avail # show all available modules
module spider mod_name # check available `<mod_name>` in sockeye

Job Submission

Summary workflow

  1. Login via ssh
  2. Modify your job script
    • required modules
    • required environment
    • required resources
  3. Submit job
  4. Inspect results
  5. Pray and repeat until success!

Tip

We are building our lab handbook with known FAQs for debugging on Sockeye, check out here

Thanks!